import * as API from "@/services";
import {correspVal} from "@/utils/biz";

export const getArticleQuoteArr = (isZhCN?: boolean, article?: API.FrontArticle) => {
  const quoteArr = [
    correspVal(isZhCN, article?.articleAuthorCn, article?.articleAuthorEn),
    correspVal(isZhCN, article?.articleTitleCn, article?.articleTitleEn),
    `${correspVal(isZhCN, article?.journal?.journalNameCn || article?.journalNameCn, article?.journal?.journalNameEn || article?.journalNameEn)}, ${article?.period?.year}, ${article?.period?.volume}(${article?.period?.period}): ${article?.articleStartpage}-${article?.articleEndpage}`,
    `doi: ${article?.articleDoi}`
  ]
  return quoteArr.join(". ")
}
